/*
 * MIT License
 *
 * Copyright (c) 2023 北京凯特伟业科技有限公司
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */
package com.je.message.rpc;

import com.alibaba.fastjson2.JSONObject;
import com.je.common.base.micromail.service.MicromailService;
import com.je.common.base.micromail.vo.CommentVo;
import com.je.common.base.micromail.vo.MicromailVo;
import com.je.message.service.micromail.MetaMicromailService;
import org.apache.servicecomb.provider.pojo.RpcSchema;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.Map;

@RpcSchema(schemaId = "metaMicromailRpcService")
public class MicromailRpcServiceImpl implements MicromailService {

    @Autowired
    private MetaMicromailService metaMicromailService;

    @Override
    public Map<String, Object> getMicromailTotalTypeCount(String userId, String modelId) {
        return metaMicromailService.getMicromailTotalTypeCount(userId,modelId);
    }

    @Override
    public int getMicromailTotalCount(String userId, String modelId) {
        return metaMicromailService.getMicromailTotalCount(userId,modelId);
    }

    @Override
    public Map<String, Object> getNoReadCount(String userId, String modelId) {
        return metaMicromailService.getNoReadCount(userId,modelId);
    }

    @Override
    public long getNoReadsCount(String userId) {
        return metaMicromailService.getNoReadsCount(userId);
    }

    @Override
    public Map<String, Object> createMicromail(MicromailVo micromailVo) {
        return metaMicromailService.createMicromail(micromailVo);
    }

    @Override
    public MicromailVo getMicromailById(String id) {
        return metaMicromailService.getMicromailById(id);
    }

    @Override
    public void addReadMicromail(String id, String userId, String type) {
        metaMicromailService.addReadMicromail(id,userId,type);
    }

    @Override
    public Map<String, Object> toMicromailRemind(String id, String userId) {
        return metaMicromailService.toMicromailRemind(id,userId);
    }

    @Override
    public Map<String, Object> deleteMicromail(String id) {
        return metaMicromailService.deleteMicromail(id);
    }

    @Override
    public Map<String, Object> deleteComment(String id) {
        return metaMicromailService.deleteComment(id);
    }

    @Override
    public CommentVo createComment(String id, String hfr, String hfrId, String file, String zw, String fileId) {
        return metaMicromailService.createComment(id,hfr,hfrId,file,zw,fileId);
    }

    @Override
    public void sendMsg() {
        metaMicromailService.sendMsg();
    }

    @Override
    public Map<String, Object> getMicromailComments(String id, String pageNumber, String limit) {
        return metaMicromailService.getMicromailComments(id,pageNumber,limit);
    }

    @Override
    public Map<String, Object> getNoReadMicromailList(String id, String lasgMsgIdId, String limit) {
        return metaMicromailService.getNoReadMicromailList(id,lasgMsgIdId,limit);
    }

    @Override
    public Map<String, Object> getMicromailUpsById(String id, String pageNumber, String limit) {
        return metaMicromailService.getMicromailUpsById(id,pageNumber,limit);
    }

    @Override
    public Map<String, Object> getReadMicromailList(String id, String lasgMsgIdId, String limit) {
        return metaMicromailService.getReadMicromailList(id,lasgMsgIdId,limit);
    }

    @Override
    public Map<String, Object> getMyMicromailLists(String userId, String modelId, String keyWord, String startTime, String endTime, String readType, String type, String pageNumber, String limit) {
        return metaMicromailService.getMyMicromailLists(userId,modelId,keyWord,startTime,endTime,readType,type,pageNumber,limit);
    }

    @Override
    public Map<String, Integer> getMicromailCount(String modelIds) {
        return metaMicromailService.getMicromailCount(modelIds);
    }

    @Override
    public JSONObject getRzNumWyNum(String userId) {
        return metaMicromailService.getRzNumWyNum(userId);
    }

    @Override
    public JSONObject getWyBadge(String userId) {
        return metaMicromailService.getWyBadge(userId);
    }
}
